package com.Gwo.org.service.impl;

import com.Gwo.basic.mapper.BaseMapper;
import com.Gwo.basic.service.impl.BaseServiceImpl;
import com.Gwo.org.domain.Product;
import com.Gwo.org.mapper.ProductMapper;
import com.Gwo.org.service.IProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional(readOnly = true,propagation = Propagation.SUPPORTS)
public class ProductServiceImpl extends BaseServiceImpl<Product> implements IProductService {
    @Autowired
    private ProductMapper mapper;
    @Override
    public List<Product> anotherfindById(Long id) {
        List<Product> list = mapper.anotherfindById(id);
        return list;
    }

    @Override
    @Transactional
    public void deleteByTypeId(Long id) {
        mapper.deleteByTypeId(id);
    }
}
